<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>APP下载</title>
  <style>
   .info-container {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;
    background-color: #f5f7fa;
  }
  
  .info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 400px;
    text-align: center;
    transition: transform 0.3s ease;
  }
  
  .info-card:hover {
    transform: translateY(-5px);
  }
  
  .user-info, .app-info, .app-summary {
    margin: 15px 0;
    color: #333;
    line-height: 1.6;
  }
  
  .user-info {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
  }
  
  .app-info {
    font-size: 16px;
    color: #34495e;
  }
  
  .app-summary {
    font-size: 14px;
    color: #7f8c8d;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
  }
  
  .slogan {
    margin: 20px 0;
    color: #3498db;
    font-weight: bold;
    font-size: 16px;
    line-height: 0.9;
  }
  
  .logo-container {
    margin: 20px 0;
  }
  
  .company-logo {
    width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .download-button {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  }
  
  .download-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
  }

 #downloadBtn {
  display: inline-block;
  padding: 12px 24px;
  background: #409eff;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  transition: background-color 0.3s;
 }
  </style>
</head>
<body> 
<div class="info-container">
  <div class="info-card">
      <p id="userInfo"></p>
      <p id="appInfo"></p>
      <br>
    <div class="slogan">
      <p><i>胜佳软件 用心服务</i></p>
      <p><i>专心、专注、专业</i></p>
    </div>
    
    <div class="logo-container">
      <img src="/src/assets/images/7c65fbdfe6954508e7b47142e673e02.png" alt="胜佳软件 Logo" class="company-logo">
    </div>
    
    <a id="downloadBtn" href="#">立即下载</a>
  </div>
</div>

  <script>
    // 获取URL参数
    const params = new URLSearchParams(window.location.search);
    const userName = params.get('userName') || '未指定用户';
    const appName = params.get('appName') || '未知应用';
    const downloadUrl = params.get('downloadUrl');

    // 显示信息
    document.getElementById('userInfo').textContent = `用户: ${userName}`;
    document.getElementById('appInfo').textContent = `应用名称: ${appName}`;

    // 设置下载按钮
if (downloadUrl) {
    const btn = document.getElementById('downloadBtn');
    btn.href = downloadUrl;
    btn.onclick = (e) => {
        e.preventDefault();
        const iframe = document.createElement('iframe');
        iframe.style.display = 'none';
        iframe.src = downloadUrl;
        document.body.appendChild(iframe);
        setTimeout(() => {
            document.body.removeChild(iframe);
        }, 5000);
    };
}

    // 微信环境检测
    if (/MicroMessenger/i.test(navigator.userAgent)) {
      const weixinTip = document.createElement('div');
      weixinTip.innerHTML = `
        <div style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.8);z-index:999;color:white;display:flex;flex-direction:column;justify-content:center;align-items:center;">
          <p style="font-size:18px;margin-bottom:20px;">请点击右上角</p>
          <p style="font-size:18px;">选择"在浏览器中打开"</p>
        </div>
      `;
      document.body.appendChild(weixinTip);
    }
  </script>
</body>
</html>